<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>思途旅行后台管理系统</title>
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/admin/index.css">
    <link rel="stylesheet" href="/js/admin/skin/layer.css">
    <link rel="stylesheet" href="/js/admin/uploadify/uploadify.css">
    <link rel="stylesheet" href="/css/admin/upload.css">
    <script src="/js/jquery-1.10.2.js"></script>
    <script src="/js/admin/bootstrap.js"></script>
    <script src="/js/admin/layer.js"></script>
    <script src="/js/admin/dialog.js"></script>
    <script src="/js/admin/util.js"></script>
    <script src="/js/admin/upload.js"></script>
    <script src="/assets/wangeditor/wangEditor.min.js"></script>
    <style>
        .actived{
            background-color: #333;
        }
    </style>
    <script type="text/javascript">
        $.ajaxSetup({
            headers: { 'X-CSRF-TOKEN' : '{{ csrf_token() }}' }
        });
    </script>
</head>
<body>
<div class="wrap">
    <div class="header">
        <span class="title"><a href="/index.php/admin/home">
                <span style="font-weight: 600;">思途旅行</span>
                <span style="font-size: 16px;font-weight: 400;">后台管理</span>
            </a></span>
        <span class="personal">
            <i class="glyphicon glyphicon-user"></i> <span>欢迎&nbsp;&nbsp;</span>{{Auth::user()->display_name}}&nbsp;&nbsp;
            <i class="glyphicon glyphicon-log-out"></i><a onclick="logout()" style="cursor: pointer;">退出</a>
        </span>
    </div>
    <div class="row">
        <div class="col-lg-2">
            <div class="leftSide">
                <ul class="list-group">
                    <li class="{{$activited=='home'?'actived':''}}"><a href="/index.php/admin/home" class="firstPage"><span class="glyphicon glyphicon-home"></span>首页</a></li>
                    {{--<li><a href="" class="firstPage"><span class="glyphicon glyphicon-tree-deciduous"></span>国内游</a></li>--}}
                    {{--<li><a href="" class="firstPage"><span class="glyphicon glyphicon-usd"></span>出境游</a></li>--}}
                    {{--<li><a href="" class="firstPage"><span class="glyphicon glyphicon-plane"></span>周边游</a></li>--}}
                    {{--<li><a href="" class="firstPage"><span class="glyphicon glyphicon-camera"></span>自驾游</a></li>--}}
                    <li class="{{$activited=='scene'?'actived':''}}">
                        <a href="/index.php/admin/scene/list" class="firstPage">
                            <span class="glyphicon glyphicon-briefcase"></span>景区管理
                        </a>
                    </li>
                    <li class="{{$activited=='area'?'actived':''}}">
                        <a href="/index.php/admin/area/list" class="firstPage">
                            <span class="glyphicon glyphicon-briefcase"></span>地区管理
                        </a>
                    </li>
                    <li class="{{$activited=='activity'?'actived':''}}">
                        <a href="/index.php/admin/activity/list" class="firstPage">
                            <span class="glyphicon glyphicon-briefcase"></span>活动管理
                        </a>
                    </li>
                    <li class="{{$activited=='user'?'actived':''}}">
                        <a href="/index.php/admin/user/list" class="firstPage">
                            <span class="glyphicon glyphicon-user"></span>用户管理
                        </a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="col-lg-10 main">
            <input type="hidden" class="token" value="{{csrf_token()}}">
            @yield('content')
        </div>
    </div>
</div>
</body>
<script>
    function logout() {
        dialog.confirm("确认退出？",function callback(){
            var Url = '/index.php/auth/logout';
            $.ajax({
                type:"post",
                data:{},
                url:Url,
                dataType:"json",
                success:function(data){
                    if(data.res==1){
                        var _url='/index.php/admin/login'
                        dialog.success("退出成功！",_url);
                    }else{
                        dialog.error(data.msg);
                    }
                }
            });
        });
    }
</script>
</html>